package com.java.runnable.exer1;

/**
 * @author luzhikun
 * @date &{DATE}-20:13
 */
public class RunnableTest {
    public static void main(String[] args) {
        MyRunnable myRunnable = new MyRunnable();

        Thread thread = new Thread(myRunnable);
        thread.setName("线程一");
        thread.start();
    }
}

class MyRunnable implements Runnable {

    public void run() {
        for (int i = 0; i < 100; i++) {
            if (i % 2 == 0) {
                System.out.println(Thread.currentThread().getName() + " " + i);
            }

        }
    }
}
